package NonBinaryAttributes;


public class Item {
	private int fid;
	private int support;

	public Item(int id) {
		fid = id;
		support = 0;
	}
	public void increaseSupport() {
		support++;		
	}
	
	public int getId() {
		return fid;
	}
	
	public int getSupport() {
		return support;
	}
	
	@Override
	public String toString() {
		return GlobalTransactionList.getInstance().getMappedValue(fid);
	}
	
	@Override
	public boolean equals(Object obj) {
		if (obj instanceof Item) {
			Item o = (Item)obj;
			return o.fid == fid;
		}		
		return false;
	}
	
	@Override
	public int hashCode() {
		return fid;
	}
}
